<h6>Submission Information</h6>
<div class="form_question">
<div class="form_element_label">Status</div> 
<div class="form_element"><%=h @submission.status.name %></div>                 
</div>   
<div class="form_question">
<div class="form_element_label">Total Cost</div> 
<div class="form_element"><%=h sprintf("$ %0.2f", @submission.total_cost) %></div>                 
</div> 
<div class="form_question">
<div class="form_element_label">Manager</div> 
<div class="form_element"><%=h @submission.manager.display_name %></div>                 
</div>  
<div class="form_question">
<div class="form_element_label">Judges Average Score</div> 
<div class="form_element"><%=h @submission.judges_avg_score %></div>                 
</div>
<h6>Applicant Information</h6>
<div class="form_question">
<div class="form_element_label">Contact</div> 
<div class="form_element">
	<p>
		<strong>Email Address</strong>: <%= mail_to @submission.user.email %>
	</p>

	<p>
		<strong>Name</strong>: <%=h @submission.user.first_name + " " +  @submission.user.last_name %> 

	</p> 

	<p>
		<strong>Work Phone</strong>: <%=h @submission.user.work_phone %> 
	</p>

	<p>
		<strong>Site</strong>: <%=h @submission.user.site.name %> 
	</p>   

	<p>
		<strong>Position/Title</strong>: <%=h @submission.user.position %> 
	</p>

	<p>
		<strong>Site Phone</strong>: <%=h @submission.user.site.phone %> 
	</p>

	<% if @submission.user.id != @submission.user.site.manager.id -%>
	<p>
		<strong>Manager</strong>: <%= link_to @submission.user.site.manager.display_name, :action => "show", :id => @submission.user.site.manager %> 
	</p>  

	<p>
		<strong>Manager Email</strong>: <%= mail_to @submission.user.site.manager.email %> 
	</p>

	<p>
		<strong>Manager Phone</strong>: <%=h @submission.user.site.manager.work_phone %> 
	</p>   
	<% end -%>
</div>                 
</div>

<%= render :inline => @submission.cycle.admin_view, :locals => { :@submission_data => @submission_data } %>   

<h6>Approvals</h6>
<div class="form_question">

	<% for approval in @submission.approvals -%>  
	<div class="form_element_label"><%= link_to approval.manager.display_name, :controller => "account", :action => "show", :id => approval.manager %></div> 
	<div class="form_element">    
		<p><strong>Approved?:</strong> <%=h approval.approved %></p> 
		<p><strong>Complete?:</strong> <%= approval.complete %></p>
		<p><strong>Approval Last Updated:</strong> <%= approval.updated_at %></p>
		<p><strong>Approval Reqested:</strong> <%= approval.created_at %></p>  
		<p><strong>Approver's Notes:</strong></p> 
		<%= simple_format(approval.notes) %> 		
	</div>
	<% end -%>
</div>   

<h6>Judgments</h6>
<div class="form_question">

	<% for j in @submission.judgments -%>  
	<div class="form_element_label"><%= link_to j.judge.display_name, :controller => "account", :action => "show", :id => j.judge %></div> 
	<div class="form_element"> 
		<p><strong>Complete:</strong> <%= j.complete %></p>
		<p><strong>Judges Scores</strong>
			<ul>
            <% if j.data %>
            <% j.data.each { |k,v| -%>
				<li><%= "#{k}: #{v}" %></li>
			<% } -%>
            <% end %>
			</ul>
		<p><strong>Judges' Final Score:</strong> <%= j.score %></p>
		<p><strong>Judgment Last Updated:</strong> <%= j.updated_at %></p>
		<p><strong>Judgment Reqested:</strong> <%= j.created_at %></p>
		<p><strong>Judges' Notes:</strong></p> 
		<%= simple_format(j.notes) %>
	</div>
	<% end -%>
</div>

<br />   
<%= link_to 'Print', "javascript:window.print()" %> |
<%= link_to 'Back', :action => 'list' %>
